home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / etc / magic.z / magic
Text File  |  1992-04-03  |  8KB  |  264 lines

  1. #ident    "$Revision: 1.28 $
  2. #
  3. #        file cmd's magic file
  4. #
  5. #    Basically, the fields of this file are as follows:
  6. #    byte offset, value type, optional operator (= by default), value
  7. #    to match (numeric or string), and string to be printed.  Numeric
  8. #    values may be decimal, octal, or hex, or addr; addr is simply the
  9. #    address of the match in memory, useful primarily with printf formats.
  10. #    A matching value "x" matches anything for non-string value types.
  11. #    Also note that the last string may have 1 printf format spec.
  12. #
  13. #    The '>' in occassional column 1's is magic: it forces file to
  14. #    continue scanning and matching additional lines.  The first line
  15. #    afterwards not so marked terminates the search.
  16. #    The strings to be printed for successive lines marked with '>'
  17. #    are output on the same line, with a space character between
  18. #    each field - unless the first character of the output string
  19. #    is a backspace, in which case the space and the backspace are
  20. #    both suppressed.
  21. #
  22. #    Note that by combining the "addr" value type with a matching value
  23. #    of "x" (match anything for non-string value types), and a printf
  24. #    format of "%s", one can print arbitrary strings.  The string will
  25. #    be printed up to the first \0 or \n, whichever comes first.
  26. #    See the #! entries for an example.
  27. #
  28. 0    short        000732        SGI imagelib image
  29. >6     short        x        (%d x
  30. >8     short        x        %d)
  31. 0    short        0155001        SGI imagelib image (byte swapped)
  32. 0    string        %!        PostScript file
  33. 0    short        070707        cpio archive
  34. 0    string        070707        ASCII cpio archive
  35. 0    long        0177555        obsolete ar archive
  36. 0    short        0177545        pdp11/pre System V ar archive
  37. 0    long        0100554        apl workspace
  38. 0    short        017436        packed data
  39. 0    short        017037        packed data (byte swapped)
  40. 0    short        017635        compressed data
  41. 0    string        <ar>        System V Release 1 ar archive
  42. 0    string        !<arch>        current ar archive
  43. 0    long        0407        68020 executable 
  44. 0    long        0410        68020 pure executable
  45. 0    short        0407        pdp11/pre System V vax executable
  46. >8    short        >0        not stripped
  47. >15    byte        >0        - version %ld
  48. 0    short        0401        unix-rt ldp
  49. 0    short        0405        pdp11 overlay
  50. 0    short        0410        pdp11/pre System V vax pure executable
  51. >8    short        >0        not stripped
  52. >15    byte        >0        - version %ld
  53. 0    short        0411        pdp11 separate I&D
  54. >8    short        >0        not stripped
  55. >15    byte        >0        - version %ld
  56. 0    short        0432        Compiled Terminfo Entry
  57. 0    short        0433        Curses screen image
  58. 0    short        0434        Curses screen image
  59. 0    short        0437        pdp11 kernel overlay
  60. 0    short        0570        vax executable
  61. >12    long        >0        not stripped
  62. >22    short        >0        - version %ld
  63. 0    short        0575        vax pure executable
  64. >12    long        >0        not stripped
  65. >22    short        >0        - version %ld
  66. 0    short        0502        basic-16 executable
  67. >12    long        >0        not stripped
  68. >22    short        >0        - version %ld
  69. 0    short        0503        basic-16 executable (TV)
  70. >12    long        >0        not stripped
  71. >22    short        >0        - version %ld
  72. 0    short        0510        x86 executable
  73. >12    long        >0        not stripped
  74. 0    short        0511        x86 executable (TV)
  75. >12    long        >0        not stripped
  76. 0    short        0550        3b20 executable
  77. >12    long        >0        not stripped
  78. >22    short        >0        - version %ld
  79. 0    short        0551        3b20 executable (TV)
  80. >12    long        >0        not stripped
  81. >22    short        >0        - version %ld
  82. 0    short        0560        WE32000 executable
  83. >12    long        >0        not stripped
  84. >18    short        ^00010000    - N/A on 3b2/300 w/paging
  85. >18    short        &00020000    - 32100 required
  86. >18    short        &00040000    and mau hardware required
  87. >20    short        0443        (target shared library)
  88. >20    short        0410        (swapped)
  89. >20    short        0413        (paged)
  90. >22    short        >0        - version %ld
  91. 0    short        0561        WE32000 executable (TV)
  92. >12    long        >0        not stripped
  93. >18    short        &00020000    - 32100 required
  94. >18    short        &00040000    and mau hardware required
  95. >22    short        >0        - version %ld
  96. 0    short        =0512        iAPX 286 executable small model (COFF)
  97. >12    long        >0        not stripped
  98. >22    short        >0        - version %ld
  99. 0    short        =0522        iAPX 286 executable large model (COFF)
  100. >12    long        >0        not stripped
  101. >22    short        >0        - version %ld
  102. 0    short        0520        mc68k executable
  103. >12    long        >0        not stripped
  104. 0    short        0521        mc68k executable (shared)
  105. >12    long        >0        not stripped
  106. 0    short        0522        mc68k executable (shared demand paged)
  107. >12    long        >0        not stripped
  108. 0    short        0x8765        disk quotas file
  109. 0    short        0x0506        IRIS Showcase file
  110. >2    byte        0x49        
  111. >3    byte        x        - version %d
  112. 0    short        0x0226        IRIS Showcase template
  113. >2    byte        0x63        
  114. >3    byte        x        - version %d
  115. 4    long        0xdeadbabe    IRIX Parallel Arena
  116. >8    long        >0        - version %d
  117. #
  118. # MIPS binary information - Note that version number printing is an
  119. # extreme hack.
  120. #
  121. 0    short        0x0160        mipseb
  122. >20    short        0407        executable
  123. >20    short        0410        pure
  124. >20    short        0413        demand paged
  125. >8    long        !0        not stripped
  126. >8    long        0        stripped
  127. >18    short        &0x0400        (R4000 fpdiv clean)
  128. >18    short        ^0x0400        (R4000 fpdiv unchecked)
  129. >22    byte        x        - version %ld.
  130. >23    byte        x        %ld
  131. 0    short        0x0162        mipsel
  132. >20    short        0407        executable
  133. >20    short        0410        pure
  134. >20    short        0413        demand paged
  135. >8    long        !0        not stripped
  136. >8    long        0        stripped
  137. >18    short        &0x0400        (R4000 fpdiv clean)
  138. >18    short        ^0x0400        (R4000 fpdiv unchecked)
  139. >23    byte        x        - version %ld.
  140. >22    byte        x        %ld
  141. 0    short        0x6001        swapped mipseb
  142. >20    short        03401        executable
  143. >20    short        04001        pure
  144. >20    short        05401        demand paged
  145. >8    long        !0        not stripped
  146. >8    long        0        stripped
  147. >18    short        &0x0004        (R4000 fpdiv clean)
  148. >18    short        ^0x0004        (R4000 fpdiv unchecked)
  149. >22    byte        x        - version %ld.
  150. >23    byte        x        %ld
  151. 0    short        0x6201        swapped mipsel
  152. >20    short        03401        executable
  153. >20    short        04001        pure
  154. >20    short        05401        demand paged
  155. >8    long        !0        not stripped
  156. >8    long        0        stripped
  157. >18    short        &0x0004        (R4000 fpdiv clean)
  158. >18    short        ^0x0004        (R4000 fpdiv unchecked)
  159. >22    byte        x        - version %ld.
  160. >23    byte        x        %ld
  161. 0    short        0x180        mipseb ucode
  162. 0    short        0x182        mipsel ucode
  163. 0       long            0x7f454c46      ELF executable
  164. #
  165. # MIPS 2 additions below
  166. #
  167. 0    short        0x0163        mipseb mips2
  168. >20    short        0407        executable
  169. >20    short        0410        pure
  170. >20    short        0413        demand paged
  171. >8    long        !0        not stripped
  172. >8    long        0        stripped
  173. >22    byte        x        - version %ld.
  174. >23    byte        x        %ld
  175. 0    short        0x0166        mipsel mips2
  176. >20    short        0407        executable
  177. >20    short        0410        pure
  178. >20    short        0413        demand paged
  179. >8    long        !0        not stripped
  180. >8    long        0        stripped
  181. >22    byte        x        - version %ld.
  182. >23    byte        x        %ld
  183. 0    short        0x6301        swapped mipseb mips2
  184. >20    short        03401        executable
  185. >20    short        04001        pure
  186. >20    short        05401        demand paged
  187. >8    long        !0        not stripped
  188. >8    long        0        stripped
  189. >23    byte        x        - version %ld.
  190. >22    byte        x        %ld
  191. 0    short        0x6601        swapped mipsel mips2
  192. >20    short        03401        executable
  193. >20    short        04001        pure
  194. >20    short        05401        demand paged
  195. >8    long        !0        not stripped
  196. >8    long        0        stripped
  197. >23    byte        x        - version %ld.
  198. >22    byte        x        %ld
  199. #
  200. # IRIX core format version 1 (from /usr/include/core.out.h)
  201. 0    long        0xdeadadb0    IRIX core dump
  202. >4    long        1        of
  203. >16    addr        x        '%s'
  204. #
  205. # Archives - This handles archive subtypes
  206. #
  207. 0    string        !<arch>\n__________E    MIPS archive
  208. >20    string        U            with mipsucode members
  209. >21    string        L            with mipsel members
  210. >21    string        B            with mipseb members
  211. >19    string        L            and a EL hash table
  212. >19    string        B            and a EB hash table
  213. >22    string        X            -- out of date
  214. 0    string        !<arch>        archive
  215. # #! scripts; prints interpreter name as well; check for just 3 legal cases
  216. # so we don't catch comments starting with !, etc.
  217. 0    string        #! /        
  218. >3    addr        x    %s script
  219. 0    string        #!\t/        
  220. >3    addr        x    %s script
  221. 0    string        #!/        
  222. >2    addr        x    %s script
  223. #
  224. 0    string        GIF        GIF image 
  225. >3    string        87a        (version 87a) 
  226. >3     string        89a        (version 89a)
  227. # can use short and %d on little endian machines
  228. >7     char        x        (0x%x
  229. >6     char        x        %02x
  230. >9     char        x        x 0x%x
  231. >8     char        x        %02x)
  232. 0    long        0x59a66a95    raster image
  233. #
  234. 8    long        0x41494646        AIFF sound data file
  235. 0    long        0x4e54524b        MultiTrack sound data file
  236. >4    long        x            - version %ld
  237. # These are from the PBMPLUS package's auxiliary magic numbers file
  238. # Most of these entries use the "string" format so that they will work on
  239. # both big-endian and little-endian machines.
  240. 0    string        begin            uuencoded file
  241. 0    string        xbtoa            btoa'd file
  242. 0    string        P1            PBM file
  243. 0    string        P2            PGM file
  244. 0    string        P3            PPM file
  245. 0    string        P4            PBM "rawbits" file
  246. 0    string        P5            PGM "rawbits" file
  247. 0    string        P6            PPM "rawbits" file
  248. 0    string        yz            MGR bitmap
  249. 0    long        0xf10040bb        CMU window manager bitmap
  250. 0    short        0x4d4d        TIFF file, big-endian
  251. 0    short        0x4949        TIFF file, little-endian
  252. 8    string        ILBM            IFF ILBM file
  253. 0    string        This is a BitMap file    Lisp Machine bit-array-file
  254. 0    string        !!            Bennet Yee's "face" format
  255. #
  256. 0    string        WNGZWZSC    Wingz compiled script
  257. 0    string        WNGZWZSS    Wingz spreadsheet
  258. 0    string        WNGZWZHP    Wingz help file
  259. #
  260. # Trusted IRIX info
  261. 0    string        SGIAUDIT    SGI Audit file
  262. >8    char        x        , version %d
  263. >9    char        x        .%d
  264.